package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.CcBerth;

public interface CcBerthDAO extends CrudRepository<CcBerth, Long> {
	@Query("select c from CcBerth c where c.bwardno=?1")
	public List<CcBerth> findByWard(BigDecimal bw_no);
	@Query("select c from CcBerth c where c.berthstate=?1")
	public List<CcBerth> findByberthstate(Pageable pageable,String state);
	@Query("select c from CcBerth c")
	public List<CcBerth> findByAll(Pageable pageable);
	@Query("select c from CcBerth c where c.bwardno=?1")
	public List<CcBerth> findBywb(BigDecimal bwardno);
	@Query("select count(*) from CcBerth c where c.berthstate=?1")
	public long findByCount(String state);
}
